

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:f="http://java.sun.com/jsf/core" 
	xmlns:h="http://java.sun.com/jsf/html">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<title><h:outputText value="#{bundle.label_add_dvd }"/></title>
</head>

<body>
	<f:view>
		<h:form>
			<table>
				<tr>
					<th><h:outputText value="#{bundle.label_titulo}"/>:</th>
					<td><h:inputText id="title" value="#{dvdController.dvdItem.title }" required="true" requiredMessage="#{bundle.error_title_required }"/></td>
					<td><h:message for="title" style="color: red;"/></td>
				</tr>
			
				<tr>
					<th><h:outputText value="#{bundle.label_ano}"/>:</th>
				 	<td>
				 		<h:inputText id="year" value="#{dvdController.dvdItem.year }" required="true" requiredMessage="#{bundle.error_year_required}" validatorMessage="#{bundle.error_year_invalid }" maxlength="4">
				 			<f:convertNumber integerOnly="true"/>
				 		</h:inputText>
				 	</td>
				 	<td>
				 		<h:message for="year" style="color:red;"/>
				 	</td>
				</tr>
			
				<tr>
					<th><h:outputText value="#{bundle.label_genero}"/></th>
					<td>
						<h:selectOneMenu id="genre" value="#{dvdController.dvdItem.genre}" required="true" requiredMessage="#{bundle.error_genre_required}">
							<f:selectItem itemLabel=" " itemValue=" "/>
							<f:selectItem itemLabel="#{bundle.label_genero_scfi}" itemValue="#{bundle.label_genero_scfi}"/>
							<f:selectItem itemLabel="#{bundle.label_genero_drama}" itemValue="#{bundle.label_genero_drama}"/>
							<f:selectItem itemLabel="#{bundle.label_genero_comedia}" itemValue="#{bundle.label_genero_comedia }"/>
						</h:selectOneMenu>
					</td>
					<td><h:message for="genre" style="color:red;"/></td>
				</tr>
			
				<tr>
					<th><h:outputText value="#{bundle.label_novo_genero}"/>:</th>
					<td>
						<h:inputText id="newGenre" value="#{dvdController.novoGenero}"/>
					</td>
				</tr>
			</table>
			<br />
		
					<!-- INCLUIR DVD -->
		<h:commandButton id="incluirDvd" action="#{dvdController.incluir}" value="#{bundle.label_add_dvd}"/>
	
		<br/>
	
					<!-- VOLTAR -->
		<h:commandLink action="#{menuController.index}" immediate="true">
			<h:outputText value="#{bundle.lable_voltar_pagina_inicial}"/>
		</h:commandLink>
		
		</h:form>
	</f:view>

</body>

</html>